<?php
namespace app\examScore\controller;
use app\common\Base;
use think\Db;
//--各科题型分值
class SubjectProblemScore extends Base {
	
	public function index() {
		return $this->fetch();
	}

	public function pageQuery() {
		if(request()->isPost()){
			$page = input('page');
			$rows = input('rows');
			$result = Db::table("考试题型分值")
			->page($page, $rows)->order("年级")->select();
			$grid['rows'] = selectResult($result);
			return $grid;
		}
	}

	public function addUpdate() {
		$all = request()->param();
		try {
			update('考试题型分值', $all);
			return "000";
		} catch (Exception $e) {
			echo $e->getMessage();
		}
		return "999";
	}

}
